import Vue from 'vue'
import VueRouter from 'vue-router'
import main from '../components/main.vue'
import login from '../components/login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: login
  },
  {
    path: '/main',
    component: main,
    children:[
      {
        path:'/staffinfo',
        component:  () => import('../components/system/staffinfo.vue'),
      },
      {
        path:'/roleinfo',
        component:  () => import('../components/system/roleinfo.vue'),
      },
      {
        path:'/staffinfo_role',
        component: () => import('../components/system/staffinfo_role.vue')
      },
      {
        path:'/anthorty',
        component: () => import('../components/system/anthorty.vue'),
        children: [
          {
            path: '/anthortyinfo',
            component: () => import('../components/system/anthorty/anthortyinfo.vue')
          },
          {
            path: '/anthortyshow',
            component: () => import('../components/system/anthorty/anthortyshow.vue')
          },
        ]
      },
      {
        path: "/anthorty_change",
        component: () => import('../components/system/anthorty_change.vue')
      },
      {
        path: '/datadictionary',
        component: () => import('../components/system/datadictionary.vue')
      },
      {
        path: '/modelinfo',
        component: () => import('../components/marketactive/modelinfo.vue')
      },
      {
        path: '/messageinfo',
        component: () => import('../components/marketactive/messageinfo.vue')
      },
      {
        path: '/emailinfo',
        component: () => import('../components/marketactive/emailinfo.vue')
      },
      {
        path: '/marketactive',
        component: () => import('../components/marketactive/marketactive.vue')
      },
      {
        path: '/studentpool',
        component: () => import('../components/recruitstudent/studentpool.vue')
      },
      {
        path: '/recruitstudent',
        component: () => import('../components/recruitstudent/recruitstudent.vue')
      },
      {
        path: '/trackrecord',
        component: () => import('../components/recruitstudent/trackrecord.vue')
      },
      {
        path: '/auditioninfo',
        component: () => import('../components/recruitstudent/auditioninfo.vue')
      },
      {
        path: '/disciplineinfo',
        component: () => import('../components/classinfo/disciplineinfo.vue')
      },
      {
        path: '/classroominfo',
        component: () => import('../components/classinfo/classroominfo.vue')
      },
      {
        path: '/syllabusinfo',
        component: () => import('../components/classinfo/syllabusinfo.vue')
      },
      {
        path: '/teacherinfo',
        component: () => import('../components/classinfo/teacherinfo.vue')
      },
      {
        path: '/classinfo',
        component: () => import('../components/classinfo/classinfo.vue')
      },
      {
        path: '/student',
        component: () => import('../components/student/student.vue')
      },
      {
        path: '/evalustioninfo',
        component: () => import('../components/student/evalustioninfo.vue')
      },
      {
        path: '/communicateinfo',
        component: () => import('../components/student/communicateinfo.vue')
      },
      {
        path: '/studenteritegrade',
        component: () => import('../components/student/studenteritegrade.vue')
      },
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
